From: Cosimo Cecchi Date: Tue, 24 May 2016 18:55:13 +0000 (-0700) Subject: keyboard: split out a function X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~849 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9aa3d864dc58091a1542c26cbb8b3193d2775228;p=gnome-shell.git keyboard: split out a function We're going to use this in a later commit. https://bugzilla.gnome.org/show_bug.cgi?id=766826 --- diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index d357258de..895b73c07 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -261,9 +261,9 @@ const InputSourceSessionSettings = new Lang.Class({ this._settings.connect('changed::' + this._KEY_PER_WINDOW, Lang.bind(this, this._emitPerWindowChanged)); }, - get inputSources() { + _getSourcesList: function(key) { let sourcesList = []; - let sources = this._settings.get_value(this._KEY_INPUT_SOURCES); + let sources = this._settings.get_value(key); let nSources = sources.n_children(); for (let i = 0; i < nSources; i++) { @@ -273,6 +273,10 @@ const InputSourceSessionSettings = new Lang.Class({ return sourcesList; }, + get inputSources() { + return this._getSourcesList(this._KEY_INPUT_SOURCES); + }, + get keyboardOptions() { return this._settings.get_strv(this._KEY_KEYBOARD_OPTIONS); },